package zxr.demo;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import zxr.User;

public class testspring {

    public static void main(String[] args) {
//        加载spring配置文件
        ApplicationContext context =new ClassPathXmlApplicationContext("bean1.xml");
//        获取配置创建的对象
        User user = context.getBean("user", User.class);

        System.out.println("==========");
        user.add();


    }


}
